package com.ifengchao.dao.impl;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;

import com.ifengchao.dao.IBatisBaseDao3;
import com.ifengchao.dao.iface.SolrSearchUserDao;
import com.ifengchao.pojo.HUser;

/**
 *
 *
 * @author loki.xu
 * @version V1.0	
 * 
 * @date 2018年1月9日 下午7:40:02
 */
@Repository
public class SolrSearchUserDaoImpl implements SolrSearchUserDao {

	private static final Logger logger = Logger.getLogger(SolrSearchUserDaoImpl.class);
	
	@Autowired(required = true)
	private IBatisBaseDao3 iBatisBaseDao3;
	
	@Override
	public List<HUser> getUserList() {
		logger.info("查询符合推送搜索的用户数据");
		return iBatisBaseDao3.getSqlMapClientTemplate().queryForList("solrSearchUserSql.getUserList");
	}

	@Override
	public HUser getHUser(String userId) {
		logger.info("查询用户信息");
		return (HUser) iBatisBaseDao3.getSqlMapClientTemplate().queryForObject("solrSearchUserSql.getHUser", userId);
	}

}
